﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;
using V_League.Public;

namespace V_League.DataAccess
{
    public class CLB_DataAccess
    {
        clsConnect cls;

        public void GetID_CLB(CLB_Public CLB)
        {
            cls = new clsConnect();
            CLB.Ma_CLB = cls.GetID("CLB", 10, "GetMaxID_CLB");
            cls.Disconnect();
        }

        public void SuaThongTinCLB(CLB_Public CLB)
        {
            cls = new clsConnect();
            int nParameter = 9;
            String[] name = new String[nParameter];
            Object[] value = new Object[nParameter];

            name[0] = "@Ma_CLB";
            name[1] = "@Ma_BTC";
            name[2] = "@Ma_HLV";
            name[3] = "@Hang";
            name[4] = "@MaSan";
            name[5] = "@Ma_NTT";
            name[6] = "@Ten_CLB";
            name[7] = "@SoCauThu";
            name[8] = "@DPhuc";

            value[0] = CLB.Ma_CLB;
            value[1] = CLB.Ma_BTC;
            value[2] = CLB.Ma_HLV;
            value[3] = CLB.Hang;
            value[4] = CLB.MaSan;
            value[5] = CLB.Ma_NTT;
            value[6] = CLB.Ten_CLB;
            value[7] = CLB.SoCauThu;
            value[7] = CLB.DPhuc;
            cls.ExecuteDataReader("SuaThongTinCLB",name,value,nParameter);
            cls.Disconnect();
        }




    }
}
